package io;

import java.io.*;
import java.nio.file.Files;
import java.nio.file.Paths;

public class Demo04 {
    public static void main(String[] args) {
        //1.创建流
        try {
            BufferedInputStream bis = new BufferedInputStream(Files.newInputStream(Paths.get("E:\\aaa.txt")));
//            BufferedInputStream bis = new BufferedInputStream(new FileInputStream("D:\\aaa.txt"));
            BufferedOutputStream bos = new BufferedOutputStream(Files.newOutputStream(Paths.get("E:\\b.txt")));
 //            BufferedOutputStream bos1 = new BufferedOutputStream(new FileOutputStream("E:\\b.txt"));

//            BufferedInputStream bis = new BufferedInputStream("D:\\aaa.txt"); 错误 不能接收String
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
}
